package com.itboye.sunsun.volley;

import java.io.IOException;
import java.util.HashMap;
import java.util.Map;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

import com.google.gson.FieldNamingPolicy;
import com.google.gson.GsonBuilder;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonToken;
import com.google.gson.stream.JsonWriter;
import com.itboye.sunsunhome.R;
import com.itboye.sunsun.application.App;
import com.itboye.sunsun.beans.MessagExtraBean;

import android.graphics.drawable.Drawable;
import android.text.Html;
import android.text.Html.ImageGetter;
import android.text.SpannableString;
import android.text.Spanned;

/**
 * @author Young
 *
 */

public class MessageExtra extends TypeAdapter<MessagExtraBean>{

	
	@Override
	public MessagExtraBean read(JsonReader in) throws IOException {
		if (in.peek() == JsonToken.NULL) { 
			in.nextNull();
			return null;
		}
		String json=in.nextString();
		return new GsonBuilder().setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES).create().fromJson(json, MessagExtraBean.class);
	}

 

	@Override
	public void write(JsonWriter arg0, MessagExtraBean arg1) throws IOException {
		// TODO Auto-generated method stub
		
	}

	
}
